home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 3-069 qemm 603 / 1.ima / QEMM-MAN / CH8.QEM < prev    next >
Encoding:
Text File  |  1991-10-07  |  10.0 KB  |  226 lines

  1. Chapter 8 
  2.  
  3. Other QEMM-386 Programs
  4.  
  5. This chapter describes two other QEMM programs, EMS2EXT and EMS,
  6. which give additional control over expanded memory. These two
  7. programs can be used separately or they can be used together to
  8. give you some dynamic control over your extended memory
  9. allocation.
  10.  
  11. If your system has EMS 4.0 expanded memory, but not extended
  12. memory, you may want to use the EMS2EXT.SYS device driver
  13. supplied with QEMM. EMS2EXT can supply expanded memory as
  14. extended memory to programs that access extended memory in a
  15. certain prescribed manner. Two such programs are IBM's
  16. DisplayWrite and the VDISK.SYS RAM disk utility supplied with
  17. DOS. Many disk cache utilities often use extended memory in this
  18. way also.
  19.  
  20. ~Subhead~ EMS2EXT.SYS
  21.  
  22. These and other programs can be used with EMS2EXT.SYS because
  23. they do not require that extended memory (memory above 1024K) be
  24. physically present, nor do they need to directly address this
  25. memory. They make demands upon this memory in a logical as
  26. opposed to a physical sense. And they access the contents of this
  27. memory through requests of a memory manager, which makes this
  28. memory available to the program. Programs which make use of
  29. extended memory in this way provide a performance boost over
  30. programs that rely on disk storage alone, since the in-memory
  31. transfer is much faster.
  32.  
  33. Programs that expect extended memory to be physically present
  34. cannot make use of EMS2EXT. Quarterdeck's QEXT.SYS driver, used
  35. with DESQview, cannot use memory supplied by EMS2EXT.  
  36.  
  37. Because this logical or virtual memory capability enhances a
  38. programs performance, you should have little difficulty in
  39. determining which of your applications support this memory. They
  40. will surely mention it. And, if your complement of expanded
  41. memory lends itself to this use, you will want to make this
  42. memory available to these programs.  
  43.  
  44. If you decide to use EMS2EXT you may also want to consider the
  45. relative speed of the various types of memory you have in your
  46. system. It is possible for there to be a significant speed
  47. differential between these types of memory. EMS2EXT is capable of
  48. determining this difference and can allocate either slow memory
  49. or fast memory for use as extended memory.
  50.  
  51. EMS2EXT is a device driver and therefore needs to be loaded when
  52. your system boots up. This requires a DEVICE= statement in your
  53. CONFIG.SYS file. When you have determined the amount of memory to
  54. ask EMS2EXT to manage as extended memory, you need to modify
  55. CONFIG.SYS to load EMS2EXT. The statement to load EMS2EXT must
  56. come after the one that loads your expanded memory manager and
  57. looks like:
  58.  
  59.      DEVICE=C:\QEMM\EMS2EXT.SYS MEMORY=nnn speed
  60.  
  61. Several components of this statement need to be explained. 
  62.  
  63. ~Item~ The nnn parameter in MEMORY=nnn is the number of kilobytes
  64. of expanded memory to allocate, i.e. MEMORY=512. This is
  65. optional.
  66.  
  67. ~Item~ The speed parameter is the optional specification for
  68. using faster or slower memory for allocation. Leave this part of
  69. the line blank or use either, FAST or SLOW.
  70.  
  71. ~Subhead~ The EMS Programs
  72.  
  73.  The EMS programs provide a number of informative and powerful
  74. functions to help you make the best use of your EMS 4.0 expanded
  75. memory where you might have special or unusual requirements.
  76. Although anyone might benefit from the EMS summary status report
  77. and others by seeing the detail of expanded memory allocation,
  78. other uses of EMS which will be described in these sections are
  79. for the more technically minded.  
  80.  
  81. Most of the functions of the two EMS programs, EMS.SYS and
  82. EMS.COM, involve the manipulation of expanded memory handles. An
  83. EMS handle is a reference to a block of memory (zero or more EMS
  84. pages) that the expanded memory manager issues when it allocates
  85. memory. A handle is represented by a number and it may be given a
  86. name.  
  87.  
  88. An expanded memory handle, its name, and the pages of memory
  89. associated with the handle are the fundamental tokens of
  90. interaction between an application program and an expanded memory
  91. manager. The two EMS programs give you some of the same control
  92. functions available to programs. The principal need for caution
  93. when using the EMS programs arises because they give you access
  94. to handles which may belong to other programs and EMS will not
  95. prevent you from inadvertent mischief making.  
  96.  
  97. With the EMS programs you can allocate and name a block of memory
  98. with the CREATE option, and specify that the memory be fast or
  99. slow memory.  You can free expanded memory pages allocated to a
  100. handle with the FREE option. You can read data from a file into
  101. allocated expanded memory or write the data from allocated
  102. expanded memory to a file with the LOAD or SAVE options. An EMS
  103. handle can be renamed, and the number of memory pages can be
  104. changed.
  105.  
  106. Along with the report features of EMS you can experiment with the
  107. functions using EMS as a command line interface to the expanded
  108. memory manager.
  109.  
  110.  If parts of the expanded memory in your system runs at different
  111. speeds, you can use EMS to pre-allocate memory of one speed
  112. before you load a device driver or TSR so that it can only use
  113. the memory that remains at the other speed; and you can then free
  114. the memory for use by your other applications. Quarterdeck
  115. Manifest can show you if your memory runs at different rates.
  116.  
  117. Developers using expanded memory may make use of the LOAD and
  118. SAVE function to help them when they need to work with the same
  119. context repeatedly during development and debugging.
  120.  
  121. All of these uses of EMS require an extensive knowledge of the
  122. various aspects of your system, from the details involved in the
  123. DOS boot sequence, to uses and capabilites of expanded and
  124. extended memory as well as an understanding of the applications
  125. you are attempting to control and optimize.
  126.  
  127. Both EMS.SYS and EMS.COM respond to the same command line
  128. options. You use EMS.SYS from within the CONFIG.SYS file to
  129. manipulate expanded memory during the system boot sequence. You
  130. use EMS.COM from within the AUTOEXEC.BAT file at the end of the
  131. boot sequence or directly from DOS prompt as needed.
  132.  
  133. Described below are the command line options of EMS and the
  134. parameters required by each option. Some of the options have an
  135. abbreviated form.  Where this is the case, the alternate form is
  136. shown immediately following the option when it is first
  137. introduced, and is enclosed in parentheses.
  138.  
  139. To get a summary report of your expanded memory, you issue the
  140. EMS command from the command line without any option specified.
  141. EMS outputs the following information:
  142.  
  143. ~Item~ the total amount of expanded memory, and
  144.  
  145. ~Item~ the amount currently available, and
  146.  
  147. ~Item~ the address of the Page Frame.
  148.  
  149. The DIR option displays, in tabular form, a breakdown of the
  150. current expanded memory allocated. For each allocated handle, the
  151. number of expanded memory pages is given, the number of kilobytes
  152. of memory those pages represent, and the name assigned to that
  153. handle, if any. 
  154.  
  155. The CREATE (CR) option is used to allocate pages of expanded
  156. memory. It takes two parameters. CREATE requires that you provide
  157. a name for the memory you are allocating and that you specify the
  158. amount of memory. The name may be one to eight characters long.
  159. The name need not be enclosed in quotation marks unless it
  160. contains blanks. The amount of memory you are allocating may be
  161. expressed in EMS pages (16K per page) or in kilobytes. If you
  162. specify the number of kilobytes, the memory manager will round
  163. the number up if necessary to determine the number of pages.
  164. Follow the EMS CREATE command with EMS DIR command to confirm the
  165. allocation and to determine the handle number assigned to the
  166. name.
  167.  
  168. The CREATEFAST (CFAST) and CREATESLOW (CSLOW) options are forms
  169. of the CREATE option that also instruct the memory manager to
  170. allocate the memory from either faster or slower memory. Use
  171. Manifest's Expanded Memory Timings to determine if this form of
  172. CREATE is important to you.
  173.  
  174. The FREE option frees memory and deallocates a handle. FREE
  175. requires that you specify the handle to deallocate~dash~by its
  176. name or its number.
  177.  
  178. The RENAME (REN) option lets you assign a new name to a handle.
  179. The first parameter to RENAME is the original handle. You may
  180. refer to this handle by its number or its name. The second
  181. argument is the new handle name.
  182.  
  183. The RESIZE (RES) option lets you increase or decrease the number
  184. of pages assigned to a handle. Its two arguments are the same as
  185. those of CREATE.
  186.  
  187. The SAVE option allows you to save the contents of the expanded
  188. memory pages associated with an EMS handle to a file. This option
  189. requires that you also specify the handle name (or number) and
  190. the file name.  
  191.  
  192. The LOAD option allows you to restore the contents of expanded
  193. memory pages that have been stored in a file. This option
  194. requires that you also specify the handle name (or number) and
  195. the file name which contains the data you want to restore. The
  196. number of pages required will be automatically allocated based on
  197. the files size.
  198.  
  199. The EMS programs also respond to the options common to all the
  200. programs supplied with your QEMM-386 programs:
  201.  
  202. ~Item~ NOPAUSEONERROR (NOPE) instructs EMS not to pause on error.
  203.  
  204. ~Item~ PAUSE instructs the program to pause while parsing
  205. commands.
  206.  
  207. ~Item~ HELP displays EMS help text.
  208.  
  209. ~Item~ ? lists all EMS command parameters.
  210.  
  211. ~Subhead~ Using EMS with EMS2EXT
  212.  
  213. You can load EMS2EXT as described in the EMS2EXT section of this
  214. chapter, but without specifying any memory parameter at all.
  215. EMS2EXT will be resident, but it will not allocate any memory. It
  216. will, however, recognize as its memory a handle with the name
  217. "EMS2EXT". You can then, as needed, create, grow, or shrink the
  218. amount of extended memory for this handle using EMS.COM.
  219.  
  220. This capability should only be used in special situations when
  221. you know how and when the program will use extended memory. For
  222. instance, a program could be given extended memory only while it
  223. is running. You could make a batch file which ran EMS CREATE
  224. "EMS2EXT" 128K before running the application. When the program
  225. terminates, another EMS statement could free the memory. 
  226.